package com.dries.portal.module.coupon.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dries.portal.module.coupon.enums.CouponStatus;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户优惠券表
 * 
 * @author dries
 * @email samphsanie@gmail.com
 * @date 2020-07-27 13:05:31
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("xx_coupon")
public class Coupon implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId(type = IdType.AUTO)
	private Integer id;
	/**
	 * 模板ID
	 */
	private Integer templateId;
	/**
	 * 用户ID
	 */
	private Long userId;
	/**
	 * 优惠券码
	 */
	private String couponCode;
	/**
	 * 领取时间
	 */
	private Date assignTime;
	/**
	 * 领取状态
	 */
	private CouponStatus status;

	public Coupon(Integer templateId, Long userId, String couponCode, CouponStatus status) {
		this.templateId = templateId;
		this.userId = userId;
		this.couponCode = couponCode;
		this.status = status;
	}
}
